package com.javaee.term.service.iml;

import com.javaee.term.model.SaleAdmin;
import com.javaee.term.service.SalesAdminService;
import com.javaee.term.service.base.BaseServiceIml;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author 陈伯瑞
 * date 2019/12/18 0018 12:49
 * version 1.0
 **/
@Service
public class SalesAdminServiceImpl extends BaseServiceIml implements SalesAdminService {
    @Override
    public SaleAdmin findOne(Object id) {
        return saleAdminMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<SaleAdmin> findAll() {
        return saleAdminMapper.selectAll();
    }

    @Override
    public void delete(Object id) {
        saleAdminMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SaleAdmin saleAdmin) {
        return saleAdminMapper.insert(saleAdmin);
    }

    @Override
    public int update(SaleAdmin saleAdmin) {
        return saleAdminMapper.updateByPrimaryKey(saleAdmin);
    }
}
